/**
 * 判断path是否为外链
 * @param {string} path
 * @returns {Boolean}
 */
export const isExternal = (path: string) => {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * 判断是否为字符串
 * @param {string} str
 * @returns {Boolean}
 */
export const isString = (str: any) => {
  return typeof str === 'string'
}

/**
 * 判断是否为布尔值
 * @param {boolean} str
 * @returns {Boolean}
 */
export const isBoolean = (str: any) => {
  return typeof str === 'boolean'
}
